<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<link href="dzz/connect/images/connect.css?{VERHASH}" rel="stylesheet" media="all">

<!--{template common/header_simple_end}-->
<div class="container" style="height:100%">
	<div class="main-header clearfix">
		<ul class="nav nav-pills nav-pills-bottomguide">
			<li>
				<a href="{BASESCRIPT}?mod=connect">{lang my_clouds}</a>
			</li>
			<li>
				<a href="{BASESCRIPT}?mod=connect&op=addcloud">{lang add_clouds}</a>
			</li>
			<li class="active">
				<a href="{BASESCRIPT}?mod=connect&op=oauth&bz=ftp">{lang add}FTP</a>
			</li>
		</ul>
	</div>
	<div class="main-content clearfix">
		<div class="container" style="padding:15px;">
			<form name="aliform" class="form-horizontal form-horizontal-left" action="{BASESCRIPT}?mod=connect&op=oauth" method="post" onsubmit="return validate(this)">
				<input type="hidden" name="ftpsubmit" value="true" />
				<input type="hidden" name="bz" value="ftp" />
				<input type="hidden" name="formhash" value="{FORMHASH}" />
				<div class="form-group">
					<label class="control-label">{lang site_name}</label>
					<input type="text" class="form-control required" name="config[cloudname]" value="">

				</div>
				<div class="form-group">
					<label class="control-label">IP{lang site}</label>
					<input type="text" class="form-control required" name="config[host]" value="" placeholder="{lang host_IP_address}">

				</div>
				<div class="form-group">
					<label class="control-label">{lang port}</label>
					<input type="text" class="form-control required" name="config[port]" value="21" placeholder="{lang port}">
					<span class="help-inline"></span>
				</div>
				<div class="form-group">
					<label class="control-label">{lang username}</label>
					<input type="text" class="form-control required" name="config[username]" value="" placeholder="{lang FTP_account_user_name}">

				</div>
				<div class="form-group">
					<label class="control-label">{lang password}</label>
					<input type="password" class="form-control required" name="config[password]" value="" placeholder="{lang FTP_account_user_password}">

				</div>
				<div class="form-group">
					<label class="control-label">{lang encode}</label>
					<select class="form-control" name="config[charset]">
						<option value="GBK">GBK</option>
						<option value="UTF-8" selected="selected">UTF-8</option>
						<option value="BIG5">BIG5</option>
					</select>
					<span class="help-inline">{lang oauth_ftp_encode_set}</span>

				</div>
				<!--{if function_exists('ssh2_connect')}-->
				<div class="form-group">
					<label class="control-label"></label>
					<label class="radio-inline"><input type="radio"  name="config[ssl]" checked="checked" value="0" onclick="$('pasv').style.display='block'">{lang way_FTP_connection}</label>

					<label class="radio-inline"><input type="radio"  name="config[ssl]"  value="2" onclick="$('pasv').style.display='none'">{lang use_ssh2_sftp}</label>
				</div>
				<!--{/if}-->
				<div id="pasv" class="form-group">
					<label class="control-label"></label>
					<label class="checkbox-inline"><input type="checkbox"  name="config[pasv]" checked="checked" value="1" >{lang use_Passive_Mode}</label>
					<label class="checkbox-inline"><input type="checkbox"  name="config[ssl]"  value="1" >{lang enable_secure_link}</label>

				</div>

				<div class="form-group">
					<label class="control-label"></label>
					<input type="submit" class="btn btn-primary" style="padding:6px 25px" value="{lang add}">
				</div>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">
	function validate(form) {
		var i = 0;
		jQuery("input.required").each(function() {
			if(jQuery(this).val() == '') {
				jQuery(this).focus();
				return false;
			}
			i++;
		});
		if(i < jQuery("input.required").length) {
			return false;
		} else {
			return true;
		}
	}
</script>
<script src="static/bootstrap/js/bootstrap.min.js?{VERHASH}"></script>

<!--{template common/footer_simple}-->